package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.RoutingLineMapper;
import com.ruoyi.system.domain.RoutingLine;
import com.ruoyi.system.service.IRoutingLineService;
import com.ruoyi.common.core.text.Convert;

import javax.annotation.Resource;

/**
 * 巡检线路1Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-11-29
 */
@Service
public class RoutingLineServiceImpl implements IRoutingLineService 
{
    @Resource
    private RoutingLineMapper routingLineMapper;

    /**
     * 查询巡检线路1
     * 
     * @param routingLineId 巡检线路1主键
     * @return 巡检线路1
     */
    @Override
    public RoutingLine selectRoutingLineByRoutingLineId(Long routingLineId)
    {
        return routingLineMapper.selectRoutingLineByRoutingLineId(routingLineId);
    }

    /**
     * 查询巡检线路1列表
     * 
     * @param routingLine 巡检线路1
     * @return 巡检线路1
     */
    @Override
    public List<RoutingLine> selectRoutingLineList(RoutingLine routingLine)
    {
        return routingLineMapper.selectRoutingLineList(routingLine);
    }

    /**
     * 新增巡检线路1
     * 
     * @param routingLine 巡检线路1
     * @return 结果
     */
    @Override
    public int insertRoutingLine(RoutingLine routingLine)
    {
        routingLine.setCreateTime(DateUtils.getNowDate());
        return routingLineMapper.insertRoutingLine(routingLine);
    }

    /**
     * 修改巡检线路1
     * 
     * @param routingLine 巡检线路1
     * @return 结果
     */
    @Override
    public int updateRoutingLine(RoutingLine routingLine)
    {
        routingLine.setUpdateTime(DateUtils.getNowDate());
        return routingLineMapper.updateRoutingLine(routingLine);
    }

    /**
     * 批量删除巡检线路1
     * 
     * @param routingLineIds 需要删除的巡检线路1主键
     * @return 结果
     */
    @Override
    public int deleteRoutingLineByRoutingLineIds(String routingLineIds)
    {
        return routingLineMapper.deleteRoutingLineByRoutingLineIds(Convert.toStrArray(routingLineIds));
    }

    /**
     * 删除巡检线路1信息
     * 
     * @param routingLineId 巡检线路1主键
     * @return 结果
     */
    @Override
    public int deleteRoutingLineByRoutingLineId(Long routingLineId)
    {
        return routingLineMapper.deleteRoutingLineByRoutingLineId(routingLineId);
    }
}
